/**
 * @(#)ApkBaseEnum.java 2016年11月23日
 * Copyright(C) 2016 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 手机类型类型
 * 
 * @author <a href="mailto:wangjunbiao@zhexinit.com" >王俊标</a>
 * @version 1.0.0
 */
public enum PhoneTypeEnum {
	MUSIC(1, "谷歌"), 
	CARTOON(2, "小米");

	private int type;
	private String name;

	private PhoneTypeEnum(int type, String name) {
		this.type = type;
		this.name = name;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	private static Map<Integer, PhoneTypeEnum> map = new HashMap<Integer, PhoneTypeEnum>();

	static {
		for (PhoneTypeEnum apkBaseEnum : PhoneTypeEnum.values()) {
			map.put(apkBaseEnum.type, apkBaseEnum);
		}
	}

	public static PhoneTypeEnum valueOf(int type) {
		return map.get(type);
	}
}
